package com.ilearn.iodata.iolingo.service.metadata.core.edm.mapper.api;


import com.ilearn.iodata.iolingo.service.metadata.core.edm.mapper.exception.ODataGenericModelException;
import org.apache.olingo.commons.api.edm.*;
import org.apache.olingo.commons.api.edm.provider.CsdlEntityContainer;
import org.apache.olingo.commons.api.edm.provider.CsdlSchema;
import org.apache.olingo.commons.api.edm.provider.CsdlTerm;
import org.apache.olingo.commons.api.edmx.EdmxReference;
import org.apache.olingo.server.api.etag.CustomETagSupport;

import java.util.List;

public interface GenericServiceDocument extends CustomETagSupport {

  CsdlEntityContainer getEdmEntityContainer() throws ODataGenericModelException;

  List<CsdlSchema> getEdmSchemas() throws ODataGenericModelException;

  List<CsdlSchema> getAllSchemas() throws ODataGenericModelException;

  /**
   * 
   * @param edmType
   * @return
   * @throws ODataGenericModelException
   */
  GenericEntityType getEntity(final EdmType edmType) throws ODataGenericModelException;

  GenericEntityType getEntity(final FullQualifiedName typeName);

  GenericEntityType getEntity(final String edmEntitySetName) throws ODataGenericModelException;

  GenericFunction getFunction(final EdmFunction function);

  GenericAction getAction(final EdmAction action);

  GenericEntitySet getEntitySet(final GenericEntityType entityType) throws ODataGenericModelException;

  List<EdmxReference> getReferences();

  CsdlTerm getTerm(final FullQualifiedName termName);

  GenericStructuredType getComplexType(final EdmComplexType edmComplexType);

  GenericEnumerationAttribute getEnumType(final EdmEnumType type);

  GenericEnumerationAttribute getEnumType(final String string);

}